package com.city.semis.controller;

import com.alibaba.fastjson.JSONObject;
import com.city.semis.business.IAdminBusiness;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class AdminValueController {

    @Autowired
    private IAdminBusiness abi;

    @RequestMapping(value = "/admin/all", method= RequestMethod.GET)
    @CrossOrigin("http://localhost:8080")
    public JSONObject getListByAll()  {
        return abi.getListByAll();
    }

    @RequestMapping(value = "/admin/id", method= RequestMethod.GET)
    @CrossOrigin("http://localhost:8080")
    public JSONObject getListByID(@RequestParam("uid") String aid) {
        return abi.getListByID(aid);
    }
}
